<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 数据类型转换，弹出框一，给一值存，再弹出一框，给一值存，两值相加，弹出结果 -->
    <script>
        var num1 = prompt('请输入数值一');
        var num2 = prompt('请输入数值二');
        var result = parseFloat(num1) + parseFloat(num2);
        alert('结果是' + result);
    </script>
</head>

<body>

</body>

</html>